<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
				
				<ul style="padding-left:0px;" class="list-group">
				<c:forEach items="${rootPermission.children}" var="permission">
					<c:if test="${empty permission.children}">
						<li class="list-group-item tree-closed" >
							<a href="${APP_PATH}${permission.url}"><i class="glyphicon glyphicon-dashboard"></i> ${permission.name}</a> 
						</li>
					</c:if>
					<c:if test="${not empty permission.children}">
						<li class="list-group-item tree-closed">
						<span><i class="glyphicon glyphicon glyphicon-tasks"></i> ${permission.name} <span class="badge" style="float:right">${permission.children.size()}</span></span> 
						<ul style="margin-top:10px;display:none;">
							<c:forEach items="${permission.children}" var="child">
								<li style="height:30px;">
									<a href="${APP_PATH}${child.url}"><i class="glyphicon glyphicon-user"></i> ${child.name}</a> 
								</li>
							</c:forEach>
							
						</ul>
					</li>
					</c:if>
				</c:forEach>
				
				</ul>
</body>
</html>